<?php

class Forms_Login extends Zend_Form
{
    public function  __construct($option = null) {
        
        $this->setName('loginform');
       
        parent::__construct($options);        

        $username = new Zend_Form_Element_Text('username');
        $username->setLabel('Username')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim');
  //             ->addValidator('NotEmpty')->setMessage('Please enter your name.');

        $password = new Zend_Form_Element_Password('password');
        $password->setLabel('Password')
              ->setRequired(true)
              ->addFilter('StripTags')
              ->addFilter('StringTrim');
  //            ->addValidator('NotEmpty')->setMessage('Please enter your password.');

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('username','submitbutton')
        ->setAttrib('id','save');

        $this->addElements(array($username, $password, $submit));
    }
}